package org.moyrax.jsp.util;

/**
 * Utility methods for creating and manipulating DOM Element tags.
 *
 * @author Matias Mirabelli <lumen.night@gmail.com>
 */
public class DomUtils {
  /**
   * Creates a HTML <code>script</code> tag.
   *
   * @param src  Script tag source attribute.
   */
  public static String createScriptTag(final String src) {
    return "<script type=\"text/javascript\" src=\"" + src + "\"></script>";
  }

  /**
   * Creates a HTML <code>script</code> tag.
   *
   * @param src  Script tag source attribute.
   */
  public static String createScriptTagWithBody(final String body) {
    return "<script type=\"text/javascript\">" + body + "\n</script>";
  }
}
